import request from '@/utils/request'

const LowCode = '/lowCode'
const dataSource = `${LowCode}/dataSource`
const dataSourceCategoryManager = `${LowCode}/dataSourceCategoryManager`

const userApi = {
  getDataSourceListByParentId: `${dataSourceCategoryManager}/list`,
}

export function getDataSourceListByParentId(parameter) {
  return request({
    url: userApi.getDataSourceListByParentId,
    method: 'post',
    data: parameter,
  })
}

/**
 * login func
 * parameter: {
 *     username: '',
 *     password: '',
 *     remember_me: true,
 *     captcha: '12345'
 * }
 * @param parameter
 * @returns {*}
 */
export function dataSignalQuery(parameter) {
  return request({
    url: userApi.getDataSourceListByParentId,
    method: 'post',
    data: parameter,
  })
}

export function dataQuery(parameter) {
  return request({
    url: userApi.getDataSourceListByParentId,
    method: 'post',
    data: parameter,
  })
}

export function queryDM(parameter) {
  return request({
    url: userApi.getDataSourceListByParentId,
    method: 'post',
    data: parameter,
  })
}
